package com.yc.cloud.openai.dto;


import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

@NoArgsConstructor
@Data
public class AiUiMessageDto {


    @JsonProperty("action")
    private String action;
    @JsonProperty("code")
    private String code;
    @JsonProperty("data")
    private DataDTO data;
    @JsonProperty("desc")
    private String desc;
    @JsonProperty("sid")
    private String sid;

    @NoArgsConstructor
    @Data
    public static class DataDTO {
        @JsonProperty("sub")
        private String sub;
        @JsonProperty("auth_id")
        private String authId;
        @JsonProperty("intent")
        private IntentDTO intent;
        @JsonProperty("result_id")
        private Integer resultId;
        @JsonProperty("is_last")
        private Boolean isLast;
        @JsonProperty("is_finish")
        private Boolean isFinish;

        @NoArgsConstructor
        @Data
        public static class IntentDTO {
            @JsonProperty("answer")
            private AnswerDTO answer;
            @JsonProperty("match_info")
            private MatchInfoDTO matchInfo;
            @JsonProperty("operation")
            private String operation;
            @JsonProperty("rc")
            private Integer rc;
            @JsonProperty("service")
            private String service;
            @JsonProperty("sid")
            private String sid;
            @JsonProperty("state")
            private StateDTO state;
            @JsonProperty("text")
            private String text;
            @JsonProperty("uuid")
            private String uuid;

            @NoArgsConstructor
            @Data
            public static class AnswerDTO {
                @JsonProperty("text")
                private String text;
                @JsonProperty("type")
                private String type;
            }

            @NoArgsConstructor
            @Data
            public static class MatchInfoDTO {
            }

            @NoArgsConstructor
            @Data
            public static class StateDTO {
            }
        }
    }
}
